public class Students {
    private Integer num;
    private String name;
    public Students(){
        System.out.println("1.执行了无参构造的方法");
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
        System.out.println("2.执行了set方法设置属性num");
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public void init(){
        System.out.println("4.执行了bean对象初始化方法");
    }
    public void destory(){
        System.out.println("7.执行了销毁方法");
    }
}
